<template>
    <div class="signupPopup" @click.self="setSignVisible(false)">
        <div class="signupContent">
            <i class="close el-icon-close" @click="setSignVisible(false)"></i>
            <img src="/static/images/logo.png" class="signuoLogo" />
            <div class="signuTit">
                <a href="javascript:;" :class="{active: signupType === 'login'}" @click="signupType = 'login'">登陆</a>
                <a href="javascript:;" :class="{active: signupType === 'reg'}" @click="signupType = 'reg'"> 注册</a>
            </div>
            <login-moudel v-if="signupType === 'login'"></login-moudel>
            <reg-moudel v-if="signupType === 'reg'"></reg-moudel>
        </div>
    </div>
</template>

<script>
import { mapMutations, mapGetters, mapActions} from 'vuex';
import loginMoudel from '@/components/loginMoudel.vue'
import regMoudel from '@/components/regMoudel.vue'
export default {
  data() {
    return {
        signupType: 'login'
    };
  },
  components: {
    loginMoudel, regMoudel
  },
  methods: {
    ...mapMutations({
        setSignVisible: 'SET_SIGNVISIBLE'
    })
  }
}
</script>